<%@page import="com.award.model.User"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
User user = null;
if(null!=session.getAttribute("user"))
user=(User)session.getAttribute("user");
%>
<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link type="text/css" href="./css/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link type="text/css" href="./css/flat-ui.min.css" rel="stylesheet">
    <link type="text/css" href="./css/style.min.css" rel="stylesheet">
  </head>
  
  <body>
    <nav class="navbar navbar-s navbar-lg" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
            </button>
            <a class="navbar-brand" href="#">LOGO</a>
        </div>
        <div class="collapse navbar-collapse" id="navbar-collapse">
            <ul class="nav navbar-nav navitem">
                <li class="nav-item-index"><a href="./index.jsp">抽奖</a></li>
                <li class="nav-item-history"><a href="./jsp/history.jsp">历史记录</a></li>
                <li class="nav-item-faq"><a href="./jsp/faq.jsp">帮助文档</a></li>
                <li class="nav-item-leaderboards"><a href="./jsp/leaderboards.jsp">排行榜</a></li>
                <li><a href="">美酒之家</a>
                <li><a href="">官方旗舰店</a>
            </ul>
            <ul class="nav navbar-nav navbar-right">
           		<% if(null==user){ %> 
           <div style="position:absolute;top:28%;left:70%">
                	请<a href="./jsp/connectionWechat.jsp" style="color:#FFF ">登录</a>
               		 或者<a href="./jsp/register.jsp" style="color:#FFF ">注册</a>
           </div>
               <%}else {%>
               <ul class="nav navbar-nav navbar-right">
                <!--<button class="navbar-btn sbtn sbtn-red">LOGIN</button>-->
                <li class="dropdown user-block">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding: 0;line-height: 76px;">
                        <span class="user-img">
                            <img src="<%= user.getUserImgURL() %>"></span>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="./jsp/account.jsp">欢迎您，<%= user.getUsername() %></a></li>
                        <li><a href="./jsp/updateUserInformation.jsp">修改个人信息</a></li>
                        <li class="divider"></li>
                        <li><a href="servlet/abandon">注销</a></li>
                    </ul>
                </li>
            </ul>
              <%} %>
            </ul>
        </div>
    </div>
</nav>
  </body>
</html>
